<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="style/style.css" type="text/css" />
    <style type="text/css">
        .formupdate{
            font-weight:bold;
            padding:3px 10px;
        }
        #submit{
            margin: 10px 0px;
        }
        ul li{
            color:#FF3300;
            list-style-type:none;
            font-size:20px;
        }
        .error{
            color: red;
            font-size: 13px;
            margin-left: 60px;
            margin-bottom: 20px;
        }
        input{
            height: 23px;
        }
        .edit{
            margin: 10px 0px 30px 150px;
            font-size: 30px;
            color: #FC3;
        }
    </style>
</head>
<body id="add">
<div class="divadd">
    <form action="" method="post">
        <h3 class="edit">Edit Users</h3>
        <?php echo validation_errors('<div class="error">', '</div>'); ?>
        <p class="error"><?php echo $errors;?></p>
        <table border="0">
            <tr>
                <td class="formupdate">Name</td>
                <td><input type="text" name="name" size="25" value="<?php echo $info['user_name']; ?>" /></td>
            </tr>
            <tr>
                <td class="formupdate">Password</td>
                <td><input type="password" name="pass" size="25" /></td>
            </tr>
            <tr>
                <td class="formupdate">Confirm Password</td>
                <td><input type="password" name="repass" size="25" /></td>
            </tr>
            <tr>
                <td class="formupdate">Fullname</td>
                <td><input type="text" name="fullname" size="25" value="<?php echo $info['user_fullname']; ?>" /></td>
            </tr>
            <tr>
                <td class="formupdate">Email</td>
                <td><input type="text" name="email" size="25" value="<?php echo $info['user_email']; ?>"/></td>
            </tr>
            <tr>
                <td class="formupdate">Gender</td>
                <td><select name="gender">
                        <option value="1" <?php if($info['user_gender'] == 1){ echo "selected='selected'";}?>>Nam</option>
                        <option value="0" <?php if($info['user_gender'] == 0){ echo "selected='selected'";}?>>Nữ</option>
                    </select></td>
            </tr>
            <tr>
                <td class="formupdate">Level</td>
                <td><select name="level">
                        <option value="1" <?php if($info['user_level'] == 1){ echo "selected='selected'";}?>>Admin</option>
                        <option value="2" <?php if($info['user_level'] == 2){ echo "selected='selected'";}?>>Member</option>
                    </select></td>
            </tr>
            <tr>
                <td class="formupdate">Phone</td>
                <td><input type="text" name="phone" size="25" value="<?php echo $info['user_phone']; ?>"/></td>
            </tr>



            <td>&nbsp;</td>
            <td><input id="submit" type="submit" name="submit" value="Edit" /></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
